﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace WebApplication1
{
    public partial class MoreCourse : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["SchoolId"] == null)
            {
                Response.Redirect("~/Search.aspx");
            }

            if (!IsPostBack)
            {
                int iSchoolId = Convert.ToInt32(Request.QueryString["SchoolId"]);
                DataTable dt = new DataTable();
                SQLHelper.getCourseByShoolId(iSchoolId, out dt);
                RepeaterCourse.DataSource = dt;
                RepeaterCourse.DataBind();

            }
        }
    }
}